<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <link href="__STATIC__/css/login.css" rel="stylesheet" type="text/css">
        <link href="__STATIC__/css/layer.css" rel="stylesheet" type="text/css">
        <script src="__STATIC__/js/landing-min.js"></script>
        <script src="__PUBLIC__/js/jquery-1.8.3.min.js"></script>
        <title>{$tpshop_config.shop_info_store_title}</title>
        <link rel="shortcut icon"  href="{$tpshop_config['shop_info_store_ico']}" />
        <script src="__STATIC__/js/remaining.js"></script>
    </head>
    <body>
        <div class="logintop-box">
            <div id="header">
                <div class="fl"><a href=""><img src="{$tpshop_config.shop_info_store_logo}" width="298" height="68" alt="logo"></a></div>
            </div>
        </div>
        <div class="login-bg">
            <div class="login-main">
                <div id="main">
                    <div class="Article-box"></div>
                    <div class="Article-box2"></div>
                    <div class="Article-box3"></div>
                    <div class="Article-box4"></div>
                    <div class="login-box">
                        <div class="login-box-bg"></div>
                        <span class="systemlogo">会员登陆</span>
                        <div class="login-tit">
                                <form action="{:U('Home/User/do_login')}" method="post">
                                    <input type="hidden" name="referurl" id="referurl" value="{$referurl}">
                                    <ul>
                                        <li><span class="login-user2"></span>
                                            <input type="text" id="username" name="username" class="login-user" placeholder="请输入账号">
                                        </li>
                                        <li><span class="login-pwd3"></span>
                                            <input name="password" id="password" type="password" class="login-pwd" placeholder="请输入密码" id="password">
                                        </li>
                                        <li><input type="text" name="verify_code" id="verify_code" class="login-pwd2 fl" placeholder="请输入验证码">
                                            <div class="fr"><img src="{:U('Home/User/verify')}" onclick="verify(this)" id="verify_code_img"/></div>
                                        </li>
                                        <li>
                                            <input type="button" name="Loginbtn" class="login-btn" value="立即登录" onClick="checkSubmit()" id="Loginbtn">
                                        </li>
                                        <!--  <li>没有账号 点击&nbsp;<a href="Application/regedit.php" >注册</a>&nbsp;&nbsp;｜&nbsp;&nbsp;忘记密码 点击&nbsp;<a href="">找回</a></li>-->
                                        <!-- <li><b style="color:#ff6633;">忘记密码 点击&nbsp;</b><a data-toggle="modal" href="#forgetform" style="font-size:16px;color:red;">找回</a></li> -->
                                     
                                    </ul>
                                </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="loginbm"> Copyright ©2016-2026,All Rights Reserved.前海财富动力影视基金</a></div>
</body>
</html>


<script>
    function verify() {
        $('#verify_code_img').attr('src', '/index.php?m=Home&c=User&a=verify&r=' + Math.random());
    }

    function checkSubmit()
    {
        var username = $.trim($('#username').val());
        var password = $.trim($('#password').val());
        var referurl = $('#referurl').val();
        var verify_code = $.trim($('#verify_code').val());
        

        $.ajax({
            type: 'post',
            url: '/index.php?m=Home&c=User&a=do_login&t=' + Math.random(),
            data: {username: username, password: password, referurl: referurl, verify_code: verify_code},
            dataType: 'json',
            success: function (res) {
                // /console.log(res);return false;
                if (res.status == 1) {
                    window.location.href = res.url;
                } else {
                    // alert(res.msg);
                    showErrorMsg(res.msg);
                    verify();
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                showErrorMsg('网络失败，请刷新页面后重试');
            }
        })

    }

 

    function showErrorMsg(msg) {
        alert(msg);
    }
</script>